<template>
  <div class="box">
    <h2>Child111 component</h2>
    <p>msg: {{msg}}</p>
  </div>
</template>

<script>
export default {
  name: 'Child1',
  data () {
    return {
      msg: 'abc'
    }
  },
  mounted() {
    this.$bus.$on('update',(data)=>{
      this.msg += data
    })
  },
  beforeDestroy() {
    this.$bus.$off('update')
  },
}
</script>

<style scoped>

</style>
